Skip to main content

All Questions

2votes
1answer
373views

Sum of all Paths in Binary Tree

Problem For the given binary tree return the list which has sum of every paths in a tree. i.e Every path from root to leaf. I've written following solution. ...
Ashish Pawar's user avatar
2votes
1answer
2kviews

Binary Search Tree Implementation in Java

Looking for critiques on my BST implementation, particularly to check if I'm building the common operational methods and traversal algorithms properly. Code has been lightly tested, and I've tried to ...
koprulu's user avatar
5votes
4answers
5kviews

Path sum in binary tree

Root to leaf path sum equal to a given number Given a binary tree and a number, return true if the tree has a root-to-leaf path such that adding up all the values along the path equals the given ...
Mehrdad's user avatar
6votes
5answers
11kviews

DFS in Binary Tree

I have written this code for DFS in a binary tree and would like improvements on it. ...
Mehrdad's user avatar
1vote
2answers
7kviews

DFS on a binary tree: marking nodes as visited

I wanted to write depth first search reversal iteratively in Java. Can someone review my code? I'm not that much interested in naming of the variables, but in the structure of the code, i.e. I don't ...
user3371223's user avatar
6votes
3answers
2kviews

Missing level of technical depth (Flatten Tree)

I recently have given a coding test in a reputable IT company. There were three coding questions. They refused me by saying that as we felt they didn't demonstrate the level of technical depth we'...
AAhad's user avatar

close